using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _2308NA.Model;
using _2308NA.DAL;

namespace _2308NA.BLL
{
    //内部
    public class UsersBll
    {
        UsersDal dal = new UsersDal();


        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="phone">手机号（账户）</param>
        /// <param name="pwd">密码</param>
        /// <returns></returns>
        public Users Login(string phone, string pwd)
        {
            return dal.Login(phone, pwd);
        }

        /// <summary>
        /// 列表查询
        /// </summary>
        /// <returns></returns>
        public List<Users> GetUsers(string name, int page, int size, out int count)
        {
            return dal.GetUsers(name, page, size, out count);
        }

        public Users GetUsers(int id)
        {
            return dal.GetUsers(id);
        }

        public int AddUser(Users users)
        {
            return dal.AddUser(users);
        }

        public int UpdateUser(Users users)
        {
            return dal.UpdateUser(users);
        }

        public int DeleteUser(int id)
        {
            return dal.DeleteUser(id);
        }

        public int DeleteBatch(string ids)
        {
            return dal.DeleteBatch(ids);
        }
    }
}
